package com.nhim.cms.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 * Content entity. @author Huy Lieu Ta
 */
@Entity
@Table(name = "nhim_content", catalog = "nhim_cms")
public class Content implements java.io.Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private Integer id;
	private Boolean archived;
	private Date createDate;
	private Integer version;
	
	// Constructors

	/** default constructor */
	public Content() {
	}	
	
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	/**
	 * @param archived the archived to set
	 */
	
	public void setArchived(Boolean archived) {
		this.archived = archived;
	}
	/**
	 * @return the archived
	 */
	@Column(name = "archived")
	public Boolean getArchived() {
		return archived;
	}
	/**
	 * @param createDate the createDate to set
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	/**
	 * @return the createDate
	 */
	@Column(name = "create_date")
	public Date getCreateDate() {
		return createDate;
	}
	/**
	 * @param version the version to set
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}
	/**
	 * @return the version
	 */
	@Version
	@Column(name = "version")
	public Integer getVersion() {
		return version;
	}
	

}
